]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Allow window.log to take multiple arguments
authorJasper St. Pierre <jstpierre@mecheye.net>
Sun, 29 Apr 2012 20:41:08 +0000 (16:41 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sun, 29 Apr 2012 21:12:05 +0000 (17:12 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=675104

js/ui/environment.js

index 435eed1e89650d2cc20338b1b8f84993d36c3f1e..fc3992ae2fae49497e681cb955dac9fba046adf3 100644 (file)
@@ -39,11 +39,19 @@ function _patchContainerClass(containerClass) {
     };
 }
 
+function _makeLoggingFunc(func) {
+    return function() {
+        return func([].join.call(arguments, ', '));
+    };
+}
+
 function init() {
     // Add some bindings to the global JS namespace; (gjs keeps the web
     // browser convention of having that namespace be called 'window'.)
     window.global = Shell.Global.get();
 
+    window.log = _makeLoggingFunc(window.log);
+
     window._ = Gettext.gettext;
     window.C_ = Gettext.pgettext;
     window.ngettext = Gettext.ngettext;